DEVICE - INDEPENDENT FILE FORMAT DVI type changes for

نویسنده

  • David R. Fuchs
چکیده

13. Device-independent file format. Before we get into the details of DVItype, we need to know exactly what DVI files are. The form of such files was designed by David R. Fuchs in 1979. Almost any reasonable typesetting device can be driven by a program that takes DVI files as input, and dozens of such DVI-to-whatever programs have been written. Thus, it is possible to print the output of document compilers like TEX on many different kinds of equipment. A DVI file is a stream of 8-bit bytes, which may be regarded as a series of commands in a machine-like language. The first byte of each command is the operation code, and this code is followed by zero or more bytes that provide parameters to the command. The parameters themselves may consist of several consecutive bytes; for example, the ‘set rule ’ command has two parameters, each of which is four bytes long. Parameters are usually regarded as nonnegative integers; but four-byte-long parameters, and shorter parameters that denote distances, can be either positive or negative. Such parameters are given in two’s complement notation. For example, a two-byte-long distance parameter has a value between −215 and 2 − 1. A DVI file consists of a “preamble,” followed by a sequence of one or more “pages,” followed by a “postamble.” The preamble is simply a pre command, with its parameters that define the dimensions used in the file; this must come first. Each “page” consists of a bop command, followed by any number of other commands that tell where characters are to be placed on a physical page, followed by an eop command. The pages appear in the order that they were generated, not in any particular numerical order. If we ignore nop commands and fnt def commands (which are allowed between any two commands in the file), each eop command is immediately followed by a bop command, or by a post command; in the latter case, there are no more pages in the file, and the remaining bytes form the postamble. Further details about the postamble will be explained later. Some parameters in DVI commands are “pointers.” These are four-byte quantities that give the location number of some other byte in the file; the first byte is number 0, then comes number 1, and so on. For example, one of the parameters of a bop command points to the previous bop ; this makes it feasible to read the pages in backwards order, in case the results are being directed to a device that stacks its output face up. Suppose the preamble of a DVI file occupies bytes 0 to 99. Now if the first page occupies bytes 100 to 999, say, and if the second page occupies bytes 1000 to 1999, then the bop that starts in byte 1000 points to 100 and the bop that starts in byte 2000 points to 1000. (The very first bop , i.e., the one that starts in byte 100, has a pointer of −1.)

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Device Independent DVI Interpreter Library for Various Output Devices

In this paper, we describe DVIlib, which is a device independent DVI interpreter library written in C developed by the author. Since DVIlib is completely independent from specific output devices, new printer drivers and previewers (DVIware) can be easily developed. DVIlib is a set of functions to read and render DVI files. To render a page, DVIlib generates a bitmap for each character in a page...

متن کامل

Hacking DVI files: Birth of DVIasm

This paper is devoted to the first step of developing a new DVI editing utility, called DVIasm. Editing DVI files consists of three parts: disassembling, editing, and assembling. DVIasm disassembles a DVI file to a human-readable text format (more flexible than DTL), and assembles the output back to a DVI file. DVIasm is useful for people who have a DVI file without TEX source, but need to modi...

متن کامل

specials for PDF generation

DVIPDFM(x) manages various PDF effects by means of DVI specials. Appropriate documentation of DVI specials, however, is not easy to find, and exact functionality is not simple to catch without reading the source code of DVI drivers. This paper deals with the DVI specials defined in DVIPDFM(x) that are mainly used for PDF generation. We discuss the features of those specials with some examples, ...

متن کامل

Automated Optimization of Two Dimensional High Speed Missile Inlets

Certain fonts that you requested in your dvi file could not be found on the system. In order to print your document, other fonts that are installed were substituted for these missing fonts. Below is a list of the substitutions that were made.

متن کامل

Another Look at L A TEX to SGML Conversion

Publishers are starting to use SGML as their permanent form of storage for documents. How can LTEX files be converted to an SGML instance? This paper discusses possible strategies, and describes an implementation by Elsevier Science of a system based on conversion in TEX itself, and extraction of SGML code from the dvi file.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2005